/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.emergency.resources.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.emergency.common.constant.enums.ParkEmergencySysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 应急仓库
 *
 * @author cx
 * @date 2023-11-01 09:55:30
 */
@Data
@TableName(value = "er_warehouse")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "应急仓库")
public class ErWarehouseEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 仓库编号
	*/
    @Schema(description="仓库编号")
    private String warehouseNo;

	/**
	* 仓库名称
	*/
    @Schema(description="仓库名称")
    private String warehouseName;

	/**
	* 所属单位
	*/
    @Schema(description="所属单位")
    private Long orgId;

	/**
	* 单位名称
	*/
    @Schema(description="单位名称")
    private String companyName;

	/**
	* 物资设备个数
	*/
    @Schema(description="物资设备个数")
    private Integer goodsNum;

	/**
	* 仓库类别
	*/
    @Schema(description="仓库类别")
    private Integer warehouseType;

	/**
	* 仓库地址
	*/
    @Schema(description="仓库地址")
    private String warehouseAddress;

	/**
	* 存储物资库类别
	*/
    @Schema(description="存储物资库类别")
    private Integer materialType;

	/**
	* 物资库级别
	*/
    @Schema(description="物资库级别")
    private Integer materialLevel;

	/**
	* 库容（物资数量）
	*/
    @Schema(description="库容（物资数量）")
    private String warehouseStorge;

	/**
	* 建筑面积(m2)
	*/
    @Schema(description="建筑面积(m2)")
    private BigDecimal area;

	/**
	* 经度
	*/
    @Schema(description="经度")
    private String longitude;

	/**
	* 维度
	*/
    @Schema(description="维度")
    private String latitude;

	/**
	* 高度
	*/
    @Schema(description="高度")
    private String altitude;

	/**
	* 定位
	*/
    @Schema(description="定位")
    private String location;

	/**
	* 范围
	*/
    @Schema(description="范围")
    private String scope;

	/**
	 * 是否使用
	 */
	@Schema(description="是否使用")
	private String useFlag;


	/**
	* 应急值班电话
	*/
    @Schema(description="应急值班电话")
    private String dutyPhone;

	/**
	* 传真
	*/
    @Schema(description="传真")
    private String fax;

	/**
	* 第一负责人
	*/
    @Schema(description="第一负责人")
    private String firstPerson;

	/**
	* 第一负责人电话
	*/
    @Schema(description="第一负责人电话")
    private String firstPersonPhone;

	/**
	* 第一负责人邮箱
	*/
    @Schema(description="第一负责人邮箱")
    private String firstPersonEmail;

	/**
	* 第二负责人
	*/
    @Schema(description="第二负责人")
    private String secondPerson;

	/**
	* 第二负责人电话
	*/
    @Schema(description="第二负责人电话")
    private String secondPersonPhone;

	/**
	* 第二负责人邮箱
	*/
    @Schema(description="第二负责人邮箱")
    private String secondPersonEmail;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	/**
	* 附件
	*/
    @Schema(description="附件")
    private String files;

	public String getOrgIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company,this.orgId);
	}

	public String getWarehouseTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_warehouse_type, this.getWarehouseType());
	}

	public String getMaterialTypeStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_material_category, this.getMaterialType());
	}

	public String getMaterialLevelStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_material_level, this.getMaterialLevel());
	}

	public String getUseFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.useFlag);
	}

}